/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package complet.app.tool.experiment;

import complet.helper.IOHelper;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class experiment3_5 {

    private static BufferedReader in1 = IOHelper.openReadFile("E:\\paul\\Dokumente\\MyDocuments\\NetBeans Workspace\\Completion\\stats\\225_250T\\experiment3\\buckets_1grams_wiki.dat");
    private static BufferedReader in2 = IOHelper.openReadFile("E:\\paul\\Dokumente\\MyDocuments\\NetBeans Workspace\\Completion\\stats\\225_250T\\experiment3\\buckets_1gram_eval.dat");
    private static BufferedWriter out1 = IOHelper.openWriteFile("E:\\paul\\Dokumente\\MyDocuments\\NetBeans Workspace\\Completion\\stats\\225_250T\\experiment3\\diff_1gram.dat");

    public static void main(String[] args) {
        try {
            String strLine1;
            String strLine2;
            String[] line1;
            String[] line2;
            int c = 1;
            while (true && (strLine1 = in1.readLine()) != null) {
                strLine2 = in2.readLine();
                line1 = strLine1.split("\t");
                line2 = strLine2.split("\t");
                double d1 = Double.parseDouble(line1[1]);
                double d2 = Double.parseDouble(line2[1]);
                out1.write(c + "\t" + (d1 - d2) + "\n");
                c++;
            }
            out1.flush();
            out1.close();
        } catch (IOException ex) {
            Logger.getLogger(experiment3_5.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
